<?php
require_once("../../../class2.php");
require_once("../includes/require_all.php");

if(USERNAME=="Mnementh"){
	$files = glob('*.txt');
	FOREACH($files as $file){
		$name=explode(".",$file);
		$tb_name= $name[0];
		unset($name);
		$tb_rows= file($file,FILE_IGNORE_NEW_LINES);
		FOREACH($tb_rows as $row){
			$t= explode("<:|:>",$row);
			if(isset($t[1])) {
				$id=      $database->escape_value($t[0]);
				$content= $database->escape_value($t[1]);
				mysql_query("UPDATE {$tb_name}_text SET content='$content' WHERE text_id='$id'");
			}
		}
	}
}
?>